function calculate() {
  let g = 9.8

  var input1 = parseFloat(document.getElementById("input1").value);   //k
  var input2 = parseFloat(document.getElementById("input2").value);   //s
  var input3 = parseFloat(document.getElementById("input3").value);  //φ
  var input4 = parseFloat(document.getElementById("input4").value);  //θ
  //console.log("input1", input1);

  //console.log("input2", input2);
  //console.log("input3", input3);
  // console.log("input4", input4);

  if (!input1 ) input1  = 0;
  if (!input2 ) input2  = 0;
  if (!input3 ) input3  = 0;  
  if (!input4 ) input1  = 0;

  var result =
    (Math.sqrt(2 * g * input1 * input2 * input3) * Math.sin(input4) * 3.6).toFixed(2);

  if (result == 'NaN') {
    result = 0
    alert('请按要求输入数据！')
    location.reload()
  }

  document.getElementById("result").textContent = result;
}